<html>
<head>
	<meta http-equiv='Content-Type' content="text/html; charset=utf-8">
	<title>HHP4G 对战模拟程序 Beta</title>
	<script language=javascript src=calv2.js></script>
	<script language=javascript src=index.js></script>
	<style>
		table{
  		background:#e1ebf5;
  		border:2px;
  		font-size:15px;
  		border-style:inset;
		}

	</style>
</head>

<body bgcolor=#e1ebf5>
<?php 
include('class.php');
include('config.php');
?>
<h1 align=center>输入参战各方初始数据</h1>
<table align=center border=0>
<tr>
<td colspan=1></td>
<td colspan=1></td>
</tr>
<tr>
	<td colspan=1><div align=left><a href="warhistory.php" target="_blank">战历回顾<font color=red size=1>NEW</font></a></td>
	<td colspan=1><input type=button value="启动备注窗口" onClick="memo();"></td>
	<td colspan=1><div align=right><a href="pointv4.php" target="_blank">配点器</a></td>
</tr>
<tr>
	<td colspan=3><div align=center>本次场景：<?
		$terr = terrain_cal();
		echo $g_terrain[$terr];
	?></div></td>
</tr>
</table>
<p>
<form action="input.php" method=POST name="comm_form" id="comm_form">
<div align="center"><input type="submit" value="提交">&nbsp;&nbsp;<input type="reset" value="重设"></div>
<input type=hidden name=terrain value=<?=$terr?>>
<table align=center>

<tr>
	<td><table>
<tr>
	<td>A1 Name</td>
  <td>
  <select name="pid[]" id="pida1" onChange="changelocation_dc(document.comm_form.pida1.options[document.comm_form.pida1.selectedIndex].value,document.comm_form.cida1);">
    <option selected value="">请选择牌组</option>
    <?php 
	$rs=$db->execute("select distinct pid,cgroup from cmember");
	while($rows=$db->fetch_array($rs))
	{
echo "<option value=".$rows["pid"].">".$rows["cgroup"]."</option>";
}
$db->free_result($rs);
?>
  </select>
  <script language="javascript">
subcat = new Array();
  <?php
  $rs=$db->execute("select * from cmember where available=1");
  $m=0;
  $k=0;
  
  while($rows=$db->fetch_array($rs)){
  $name1="'".$rows["pid"]."'";
  $name2="'".$rows["cmember"]."'";
  $name3="'".$rows["cid"]."'";
  ?>
subcat[<?php echo $m;?>] = new Array(<?php echo $name2;?>,<?php echo $name1;?>,<?php echo $name3;?>);
<?php
$m++;
$k++;//计算选项元素的个数
}
$db->free_result($rs);
 ?>
var twocount;
twocount=0;
twocount=<?php echo $k;?>;
</script>
  <select name="acid[]" id="cida1">
    <option selected value="">请选择牌名</option>
  </select>
</td>
</tr>
<tr>
	<td>HP</td>
	<td><input type="text" size="20" name="ahp[]"></td>
</tr>
<tr>
	<td>SP</td>
	<td><input type="text" size="20" name="asp[]"></td>
</tr>
<tr>
	<td>力</td>
	<td><input type="text" size="20" name="astr[]"></td>
</tr>
<tr>
	<td>魔</td>
	<td><input type="text" size="20" name="amgr[]"></td>
</tr>
<tr>
	<td>速</td>
	<td><input type="text" size="20" name="aspd[]"></td>
</tr>
<tr>
	<td>耐</td>
	<td><input type="text" size="20" name="avit[]"></td>
</tr>
<tr>
	<td>运</td>
	<td><input type="text" size="20" name="aluk[]"></td>
</tr>
<tr>
	<td>姓名(可选)</td>
	<td><input type="text" size="20" name="aname[]"></td>
</tr>
</table></td>
	<td><table>
<tr>
	<td>B1 Name</td>
	<td>
  <select name="pid[]" id="pidb1" onChange="changelocation_dc(document.comm_form.pidb1.options[document.comm_form.pidb1.selectedIndex].value,document.comm_form.cidb1);">
    <option selected value="">请选择牌组</option>
    <?php 
	$rs=$db->execute("select distinct pid,cgroup from cmember");
	while($rows=$db->fetch_array($rs))
	{
echo "<option value=".$rows["pid"].">".$rows["cgroup"]."</option>";
}
$db->free_result($rs);
?>
  </select>
  <script language="javascript">
subcat = new Array();
  <?php
  $rs=$db->execute("select * from cmember where available=1");
  $m=0;
  $k=0;
  
  while($rows=$db->fetch_array($rs)){
  $name1="'".$rows["pid"]."'";
  $name2="'".$rows["cmember"]."'";
  $name3="'".$rows["cid"]."'";
  ?>
subcat[<?php echo $m;?>] = new Array(<?php echo $name2;?>,<?php echo $name1;?>,<?php echo $name3;?>);
<?php
$m++;
$k++;//计算选项元素的个数
}
$db->free_result($rs);
 ?>
var twocount;
twocount=0;
twocount=<?php echo $k;?>;
</script>
  <select name="bcid[]" id="cidb1">
    <option selected value="">请选择牌名</option>
  </select>
	</td>
</tr>
<tr>
	<td>HP</td>
	<td><input type="text" size="20" name="bhp[]"></td>
</tr>
<tr>
	<td>SP</td>
	<td><input type="text" size="20" name="bsp[]"></td>
</tr>
<tr>
	<td>力</td>
	<td><input type="text" size="20" name="bstr[]"></td>
</tr>
<tr>
	<td>魔</td>
	<td><input type="text" size="20" name="bmgr[]"></td>
</tr>
<tr>
	<td>速</td>
	<td><input type="text" size="20" name="bspd[]"></td>
</tr>
<tr>
	<td>耐</td>
	<td><input type="text" size="20" name="bvit[]"></td>
</tr>
<tr>
	<td>运</td>
	<td><input type="text" size="20" name="bluk[]"></td>
</tr>
<tr>
	<td>姓名(可选)</td>
	<td><input type="text" size="20" name="bname[]"></td>
</tr>
</table></td>
</tr>

<tr>
	<td><table>
<tr>
	<td>A2 Name</td>
	<td>
  <select name="pid[]" id="pida2" onChange="changelocation_dc(document.comm_form.pida2.options[document.comm_form.pida2.selectedIndex].value,document.comm_form.cida2);">
    <option selected value="">请选择牌组</option>
    <?php 
	$rs=$db->execute("select distinct pid,cgroup from cmember");
	while($rows=$db->fetch_array($rs))
	{
echo "<option value=".$rows["pid"].">".$rows["cgroup"]."</option>";
}
$db->free_result($rs);
?>
  </select>
  <script language="javascript">
subcat = new Array();
  <?php
  $rs=$db->execute("select * from cmember where available=1");
  $m=0;
  $k=0;
  
  while($rows=$db->fetch_array($rs)){
  $name1="'".$rows["pid"]."'";
  $name2="'".$rows["cmember"]."'";
  $name3="'".$rows["cid"]."'";
  ?>
subcat[<?php echo $m;?>] = new Array(<?php echo $name2;?>,<?php echo $name1;?>,<?php echo $name3;?>);
<?php
$m++;
$k++;//计算选项元素的个数
}
$db->free_result($rs);
 ?>
var twocount;
twocount=0;
twocount=<?php echo $k;?>;
</script>
  <select name="acid[]" id="cida2">
    <option selected value="">请选择牌名</option>
  </select>

	</td>
</tr>
<tr>
	<td>HP</td>
	<td><input type="text" size="20" name="ahp[]"></td>
</tr>
<tr>
	<td>SP</td>
	<td><input type="text" size="20" name="asp[]"></td>
</tr>
<tr>
	<td>力</td>
	<td><input type="text" size="20" name="astr[]"></td>
</tr>
<tr>
	<td>魔</td>
	<td><input type="text" size="20" name="amgr[]"></td>
</tr>
<tr>
	<td>速</td>
	<td><input type="text" size="20" name="aspd[]"></td>
</tr>
<tr>
	<td>耐</td>
	<td><input type="text" size="20" name="avit[]"></td>
</tr>
<tr>
	<td>运</td>
	<td><input type="text" size="20" name="aluk[]"></td>
</tr>
<tr>
	<td>姓名(可选)</td>
	<td><input type="text" size="20" name="aname[]"></td>
</tr>
</table></td>
	<td><table>
<tr>
	<td>B2 Name</td>
	<td>
  <select name="pid[]" id="pidb2" onChange="changelocation_dc(document.comm_form.pidb2.options[document.comm_form.pidb2.selectedIndex].value,document.comm_form.cidb2);">
    <option selected value="">请选择牌组</option>
    <?php 
	$rs=$db->execute("select distinct pid,cgroup from cmember");
	while($rows=$db->fetch_array($rs))
	{
echo "<option value=".$rows["pid"].">".$rows["cgroup"]."</option>";
}
$db->free_result($rs);
?>
  </select>
  <script language="javascript">
subcat = new Array();
  <?php
  $rs=$db->execute("select * from cmember where available=1");
  $m=0;
  $k=0;
  
  while($rows=$db->fetch_array($rs)){
  $name1="'".$rows["pid"]."'";
  $name2="'".$rows["cmember"]."'";
  $name3="'".$rows["cid"]."'";
  ?>
subcat[<?php echo $m;?>] = new Array(<?php echo $name2;?>,<?php echo $name1;?>,<?php echo $name3;?>);
<?php
$m++;
$k++;//计算选项元素的个数
}
$db->free_result($rs);
 ?>
var twocount;
twocount=0;
twocount=<?php echo $k;?>;
</script>
  <select name="bcid[]" id="cidb2">
    <option selected value="">请选择牌名</option>
  </select>

	</td>

</tr>
<tr>
	<td>HP</td>
	<td><input type="text" size="20" name="bhp[]"></td>
</tr>
<tr>
	<td>SP</td>
	<td><input type="text" size="20" name="bsp[]"></td>
</tr>
<tr>
	<td>力</td>
	<td><input type="text" size="20" name="bstr[]"></td>
</tr>
<tr>
	<td>魔</td>
	<td><input type="text" size="20" name="bmgr[]"></td>
</tr>
<tr>
	<td>速</td>
	<td><input type="text" size="20" name="bspd[]"></td>
</tr>
<tr>
	<td>耐</td>
	<td><input type="text" size="20" name="bvit[]"></td>
</tr>
<tr>
	<td>运</td>
	<td><input type="text" size="20" name="bluk[]"></td>
</tr>
<tr>
	<td>姓名(可选)</td>
	<td><input type="text" size="20" name="bname[]"></td>
</tr>
</table></td>
</tr>

<tr>
	<td><table>
<tr>
	<td>A3 Name</td>
	<td>
  <select name="pid[]" id="pida3" onChange="changelocation_dc(document.comm_form.pida3.options[document.comm_form.pida3.selectedIndex].value,document.comm_form.cida3);">
    <option selected value="">请选择牌组</option>
    <?php 
	$rs=$db->execute("select distinct pid,cgroup from cmember");
	while($rows=$db->fetch_array($rs))
	{
echo "<option value=".$rows["pid"].">".$rows["cgroup"]."</option>";
}
$db->free_result($rs);
?>
  </select>
  <script language="javascript">
subcat = new Array();
  <?php
  $rs=$db->execute("select * from cmember where available=1");
  $m=0;
  $k=0;
  
  while($rows=$db->fetch_array($rs)){
  $name1="'".$rows["pid"]."'";
  $name2="'".$rows["cmember"]."'";
  $name3="'".$rows["cid"]."'";
  ?>
subcat[<?php echo $m;?>] = new Array(<?php echo $name2;?>,<?php echo $name1;?>,<?php echo $name3;?>);
<?php
$m++;
$k++;//计算选项元素的个数
}
$db->free_result($rs);
 ?>
var twocount;
twocount=0;
twocount=<?php echo $k;?>;
</script>
  <select name="acid[]" id="cida3">
    <option selected value="">请选择牌名</option>
  </select>
	</td>
</tr>
<tr>
	<td>HP</td>
	<td><input type="text" size="20" name="ahp[]"></td>
</tr>
<tr>
	<td>SP</td>
	<td><input type="text" size="20" name="asp[]"></td>
</tr>
<tr>
	<td>力</td>
	<td><input type="text" size="20" name="astr[]"></td>
</tr>
<tr>
	<td>魔</td>
	<td><input type="text" size="20" name="amgr[]"></td>
</tr>
<tr>
	<td>速</td>
	<td><input type="text" size="20" name="aspd[]"></td>
</tr>
<tr>
	<td>耐</td>
	<td><input type="text" size="20" name="avit[]"></td>
</tr>
<tr>
	<td>运</td>
	<td><input type="text" size="20" name="aluk[]"></td>
</tr>
<tr>
	<td>姓名(可选)</td>
	<td><input type="text" size="20" name="aname[]"></td>
</tr>
</table></td>
	<td><table>
<tr>
	<td>B3 Name</td>
	<td>
  <select name="pid[]" id="pidb3" onChange="changelocation_dc(document.comm_form.pidb3.options[document.comm_form.pidb3.selectedIndex].value,document.comm_form.cidb3);">
    <option selected value="">请选择牌组</option>
    <?php 
	$rs=$db->execute("select distinct pid,cgroup from cmember");
	while($rows=$db->fetch_array($rs))
	{
echo "<option value=".$rows["pid"].">".$rows["cgroup"]."</option>";
}
$db->free_result($rs);
?>
  </select>
  <script language="javascript">
subcat = new Array();
  <?php
  $rs=$db->execute("select * from cmember while available=1");
  $m=0;
  $k=0;
  
  while($rows=$db->fetch_array($rs)){
  $name1="'".$rows["pid"]."'";
  $name2="'".$rows["cmember"]."'";
  $name3="'".$rows["cid"]."'";
  ?>
subcat[<?php echo $m;?>] = new Array(<?php echo $name2;?>,<?php echo $name1;?>,<?php echo $name3;?>);
<?php
$m++;
$k++;//计算选项元素的个数
}
$db->free_result($rs);
 ?>
var twocount;
twocount=0;
twocount=<?php echo $k;?>;
</script>
  <select name="bcid[]" id="cidb3">
    <option selected value="">请选择牌名</option>
  </select>

	</td>
</tr>
<tr>
	<td>HP</td>
	<td><input type="text" size="20" name="bhp[]"></td>
</tr>
<tr>
	<td>SP</td>
	<td><input type="text" size="20" name="bsp[]"></td>
</tr>
<tr>
	<td>力</td>
	<td><input type="text" size="20" name="bstr[]"></td>
</tr>
<tr>
	<td>魔</td>
	<td><input type="text" size="20" name="bmgr[]"></td>
</tr>
<tr>
	<td>速</td>
	<td><input type="text" size="20" name="bspd[]"></td>
</tr>
<tr>
	<td>耐</td>
	<td><input type="text" size="20" name="bvit[]"></td>
</tr>
<tr>
	<td>运</td>
	<td><input type="text" size="20" name="bluk[]"></td>
</tr>
<tr>
	<td>姓名(可选)</td>
	<td><input type="text" size="20" name="bname[]"></td>
</tr>
</table></td>
</tr>

<tr>
	<td><table>
<tr>
	<td>A4 Name</td>
	<td>
  <select name="pid[]" id="pida4" onChange="changelocation_dc(document.comm_form.pida4.options[document.comm_form.pida4.selectedIndex].value,document.comm_form.cida4);">
    <option selected value="">请选择牌组</option>
    <?php 
	$rs=$db->execute("select distinct pid,cgroup from cmember");
	while($rows=$db->fetch_array($rs))
	{
echo "<option value=".$rows["pid"].">".$rows["cgroup"]."</option>";
}
$db->free_result($rs);
?>
  </select>
  <script language="javascript">
subcat = new Array();
  <?php
  $rs=$db->execute("select * from cmember while available=1");
  $m=0;
  $k=0;
  
  while($rows=$db->fetch_array($rs)){
  $name1="'".$rows["pid"]."'";
  $name2="'".$rows["cmember"]."'";
  $name3="'".$rows["cid"]."'";
  ?>
subcat[<?php echo $m;?>] = new Array(<?php echo $name2;?>,<?php echo $name1;?>,<?php echo $name3;?>);
<?php
$m++;
$k++;//计算选项元素的个数
}
$db->free_result($rs);
 ?>
var twocount;
twocount=0;
twocount=<?php echo $k;?>;
</script>
  <select name="acid[]" id="cida4">
    <option selected value="">请选择牌名</option>
  </select>

	</td>
</tr>
<tr>
	<td>HP</td>
	<td><input type="text" size="20" name="ahp[]"></td>
</tr>
<tr>
	<td>SP</td>
	<td><input type="text" size="20" name="asp[]"></td>
</tr>
<tr>
	<td>力</td>
	<td><input type="text" size="20" name="astr[]"></td>
</tr>
<tr>
	<td>魔</td>
	<td><input type="text" size="20" name="amgr[]"></td>
</tr>
<tr>
	<td>速</td>
	<td><input type="text" size="20" name="aspd[]"></td>
</tr>
<tr>
	<td>耐</td>
	<td><input type="text" size="20" name="avit[]"></td>
</tr>
<tr>
	<td>运</td>
	<td><input type="text" size="20" name="aluk[]"></td>
</tr>
<tr>
	<td>姓名(可选)</td>
	<td><input type="text" size="20" name="aname[]"></td>
</tr>
</table></td>
	<td><table>
<tr>
	<td>B4 Name</td>
	<td>
  <select name="pid[]" id="pidb4" onChange="changelocation_dc(document.comm_form.pidb4.options[document.comm_form.pidb4.selectedIndex].value,document.comm_form.cidb4);">
    <option selected value="">请选择牌组</option>
    <?php 
	$rs=$db->execute("select distinct pid,cgroup from cmember");
	while($rows=$db->fetch_array($rs))
	{
echo "<option value=".$rows["pid"].">".$rows["cgroup"]."</option>";
}
$db->free_result($rs);
?>
  </select>
  <script language="javascript">
subcat = new Array();
  <?php
  $rs=$db->execute("select * from cmember where available=1");
  $m=0;
  $k=0;
  
  while($rows=$db->fetch_array($rs)){
  $name1="'".$rows["pid"]."'";
  $name2="'".$rows["cmember"]."'";
  $name3="'".$rows["cid"]."'";
  ?>
subcat[<?php echo $m;?>] = new Array(<?php echo $name2;?>,<?php echo $name1;?>,<?php echo $name3;?>);
<?php
$m++;
$k++;//计算选项元素的个数
}
$db->free_result($rs);
 ?>
var twocount;
twocount=0;
twocount=<?php echo $k;?>;
</script>
  <select name="bcid[]" id="cidb4">
    <option selected value="">请选择牌名</option>
  </select>
	</td>
</tr>
<tr>
	<td>HP</td>
	<td><input type="text" size="20" name="bhp[]"></td>
</tr>
<tr>
	<td>SP</td>
	<td><input type="text" size="20" name="bsp[]"></td>
</tr>
<tr>
	<td>力</td>
	<td><input type="text" size="20" name="bstr[]"></td>
</tr>
<tr>
	<td>魔</td>
	<td><input type="text" size="20" name="bmgr[]"></td>
</tr>
<tr>
	<td>速</td>
	<td><input type="text" size="20" name="bspd[]"></td>
</tr>
<tr>
	<td>耐</td>
	<td><input type="text" size="20" name="bvit[]"></td>
</tr>
<tr>
	<td>运</td>
	<td><input type="text" size="20" name="bluk[]"></td>
</tr>
<tr>
	<td>姓名(可选)</td>
	<td><input type="text" size="20" name="bname[]"></td>
</tr>
</table></td>
</tr>

</table>

<p><table align=center>
<tr>
<td><div align=center>场景密码：<input type=text name="tpass" maxlength=7 size=7></div>
</td>
</tr>
</table><p>
</form>
</body>
</html>
